﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ChangeProblem.Logic
{
    public class ChangeProblem
    {
        public int[] GetChange(decimal giveChange, decimal[] change, int[] moneyNumber)
        {
            for (int i = 0; i < change.Length; i++)
            {
                moneyNumber[i] = (int)(giveChange / change[i]);
                giveChange = giveChange % change[i];
            }
            return moneyNumber;
        }

        public decimal CalculationChange(decimal commodityPrice, decimal payMent)
        {
            return payMent - commodityPrice;
        }
    }
    
}

